<!--
 * @Descripttion: 
 * @version: 
 * @Author: wutao
 * @LastEditors: wutao
 * @LastEditTime: 2025-08-14 15:39:17
-->
<template>
  <div>
  <!-- <div class="top_hytitle" style="margin-top: 0;">
            <div class="letf_line"></div>
            <div class="center_text">欢迎回来</div>
            <div class="right_line"></div>
          </div> -->
          <div class="" >
            <p style="margin: 15px 0; color: #9998a9">
              {{ formatTimestamp(topList.createTime) }}
            </p>
           
            <div class="top-box" :class="isShadow?'boxShadow':''">
              <div class="month-style">
                {{topList.month}}月投资报告
              </div>
              <div class="shouyi">
                <span>持仓收益：</span> <span class="xiahuaxian">{{topList.upType==0?`+`+topList.money:`-`+topList.money}}</span>
                <span>较上月 <span style="color: red;">+{{topList.up}}%</span></span>
              </div>
              <div class="paoying">

              </div>
              <div class="top-box-list" style="background-color: #EDF4FD;">
                <div
                  v-for="(topItemCard, topItemIndex) in topList.title"
                  class="top-box-list-item top-box-list-item-border"

                  :key="topItemIndex"
               
                  @click="gotosldetails(topItemCard)"
                >
                  <p style="margin-bottom: 15px;">
                        {{topItemIndex+1}}. {{topItemCard}}
                  </p>
                </div>
              </div>
              <div class="top-box-btn" >
                        点击查看详细内容

              </div>
              <p class="askMe">你可以尝试这样问我</p>
              <div
                @click="sendMessageBy(topItemLink)"
                v-for="(topItemLink, topItemLinkIndex) in topList.link"
                class="top-box-list-item-link"
                :key="topItemLinkIndex"
              >
                {{ topItemLink }}
              </div>
            </div>
          </div>
  </div>
</template>
  
  <script>
import {} from "@/utils/common";
import { Toast } from "vant";
import commonFunc from "@/utils/ysjh";
export default {
  data() {
    return {
    };
  },
  props: {
    topList: {
      type: Object,
      default: () => {},
    },
    isShadow: {
    type: Boolean,
    default: false,
  },
   
  },
  watch: {},
  mounted() {},
  created() {},
  methods: {
    
      formatTimestamp(ms) {
      if (!ms) {
        return "";
      }
      const time = Number(ms);
      if (!time || isNaN(time)) return "-";
      const d = new Date(time);
      const Y = d.getFullYear();
      const M = String(d.getMonth() + 1).padStart(2, "0");
      const D = String(d.getDate()).padStart(2, "0");
      const h = String(d.getHours()).padStart(2, "0");
      const m = String(d.getMinutes()).padStart(2, "0");
      const s = String(d.getSeconds()).padStart(2, "0");
      return `${Y}-${M}-${D} ${h}:${m}:${s}`;
    },
 
  },
};
</script>
  
 <style lang="less" scoped>
.ztfx-span{
    opacity: 1;
color: #666666 !important;
font-family: PingFang SC;
font-weight: regular;
font-size: 16px;
line-height: 26px;
letter-spacing: 0px;
text-align: justified;
background: none !important;
font-weight: normal !important;

}
.top-box-list-item-border{
    // border-bottom: 1px solid #aecde8;
}
.top-box-list{
    padding-bottom: 1px !important;}

    .month-style{
      width: 132px;
      height: 34px;
      background-image: url("@/assets/images/yd_title.png");
      background-size: 132px 34px;
font-family: PingFang SC;
font-weight: medium;
font-size: 16px;
line-height: 26px;
letter-spacing: 0px;
margin: 0 auto;
color: #773317;
text-align: center;

    }

    .xiahuaxian {
  color: red;
  font-family: PingFang SC;
  font-weight: bold;
  font-size: 30px;
  display: inline;
  background-image: linear-gradient(to bottom, transparent 70%, #F8D6D8 50%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.shouyi{
  display: flex;
  justify-content: center;
  margin-top: 10px;
  align-items: center;
}
.shouyi span:nth-child(2){
  margin-bottom: 15px;
  margin-left: 10px;
  margin-right: 10px;
}
.shouyi span:nth-child(3){
 font-size: 13px;
}
.paoying{
  
}
</style>
  